package com.learning.spring.bean.injection.param.entity;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.StringJoiner;

/**
 * ClassName: User
 * Description: 实体类
 * Date: 2020/7/22 9:52 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Setter
@Getter
public class User {
    private long id;
    private String name;
    private int age;
    private Date createTime;
    private Address address = new Address();
    private List<Role> roleList;
    private List<String> tagList;
    private Set<String> tagSet;
    private Map<String, String> tagMap;
    private Properties tagProps;


    @Override
    public String toString() {
        return new StringJoiner(", ", User.class.getSimpleName() + "[", "]")
                .add("id=" + id)
                .add("name='" + name + "'")
                .add("age=" + age)
                .add("createTime=" + createTime)
                .add("address=" + address)
                .add("roleList=" + roleList)
                .add("tagList=" + tagList)
                .add("tagSet=" + tagSet)
                .add("tagMap=" + tagMap)
                .add("tagProps=" + tagProps)
                .toString();
    }
}
